<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/6
 * Time: 10:42
 */
echo '用户中心<br/>';

if ($_COOKIE['Token']!=null){

    echo '有cookie';

}
?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
</head>
<body>
<div id="" style="display: flex;justify-content: center;">
    <form action="topimgs.php" method="post" enctype="multipart/form-data">
        <input type="file"  name="file" id="file" multiple="multiple" onchange="topimg(event);"><br />
        <img src="" id="show"><br/>
        <input type="submit"  value="上传"/>
    </form>
</div>
</body>
<script type="text/javascript">
    function topimg(event){
        var fileObj = document.getElementById('file');
        var files = fileObj['files'];
        var URL = window.URL || window.webkitURL;
        var imgURL = URL.createObjectURL(files[0]);
        document.getElementById('show').src = imgURL;
    }
</script>
</html>

